// app.js
App({
	onLaunch() {
		// 展示本地存储能力
		const logs = wx.getStorageSync('logs') || []
		logs.unshift(Date.now())
		wx.setStorageSync('logs', logs);

		this.overShare()		
	},
	globalData: {
		openid: '',
		token: '',
		userInfo: null,
		bannertype: 0,
	},

	overShare() {
		wx.onAppRoute((res) => {
			let pages = getCurrentPages()
			let view = pages[pages.length - 1]
			if (view) {
				wx.showShareMenu({
					menus: ['shareAppMessage', 'shareTimeline'],
					success(res) { },
					fail(e) { }
				})
			}
		})
	},

})